﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CdcSoftware.Pivotal.Applications.Core.Client;
using System.Data;
using CdcSoftware.Pivotal.Applications.Core.Common;
using CdcSoftware.Pivotal.Engine;
using CdcSoftware.Pivotal.Engine.Client.Services.Interfaces;
using Pcm.Retail.Client;
using System.Windows.Forms;
using CdcSoftware.Pivotal.Engine.UI.Forms;

namespace Pcm.Retail.Client.FormTasks
{
    public partial class RE_Sale_Serial_Number : FormClientTask
    {
        public override void OnFormInitialized()
        {
            try
            {
                base.OnFormInitialized();
                this.SharedLoad();
            }
            catch (Exception exc)
            {
                Globals.HandleException(exc, true);
            }
        }

        private void SharedLoad()
        {
            try
            {
                ((PivotalForeignKey)this.FormControl.GetControlByDataName("Store_Id")).ReadOnly = true;
            }
            catch (Exception exc)
            {
                Globals.HandleException(exc, true);
            } 
        }
    }
}
